package valiutils

import (
	"github.com/go-playground/validator/v10"
	"unicode"
)

func ValiBrief(fl validator.FieldLevel) bool {
	brief := fl.Field().String()
	for _, char := range brief {
		if !unicode.IsLetter(char) &&
			!unicode.IsDigit(char) &&
			char != '。' &&
			char != '.' &&
			char != '；' &&
			char != ';' &&
			char != ':' &&
			char != '?' &&
			char != '（' &&
			char != '）' &&
			char != '(' &&
			char != ')' &&
			char != '、' &&
			char != ' ' &&
			char != ',' &&
			char != '，' { // 允许下划线
			return false
		}
	}
	return true
}
